#include "WPILib.h"
#include "PeriodicPrinterSubsystem.hpp"

PeriodicPrinterSubsystem::PeriodicPrinterSubsystem() :
	m_firstPeriodic(true),
	m_timer()
{
	m_timer.Stop();
}

PeriodicPrinterSubsystem::~PeriodicPrinterSubsystem()
{
}

void PeriodicPrinterSubsystem::Periodic()
{
	if (m_firstPeriodic)
	{
		m_timer.Reset();
		m_timer.Start();
		m_firstPeriodic = false;
	}
	else
	{
		printf("Time Since Last Periodic: %f\n", m_timer.Get());
		m_timer.Reset();
	}
}

void PeriodicPrinterSubsystem::Disable()
{
	m_firstPeriodic = true;
}
